import { createRouter,createWebHistory } from 'vue-router'
//配置的路由信息
const route = [
    {
        path: '/',
        name: 'home',
        component: () => import('../views/Home.vue')
    },
    {
        path: '/find',
        name: 'find',
        component: () => import('../views/Find.vue'),
        children: [
            {
                path: 'discover',
                name: 'discover',
                component: () => import('../views/findchiern/Discover.vue')
            },
            {
                path: 'playlist',
                name: 'playlist',
                component: () => import('../views/findchiern/Playlist.vue')
            },
            {
                path: 'toplist',
                name: 'Toplist',
                component: () => import('../views/findchiern/Toplist.vue')
            },
        ]
    }, {
        path: '/my',
        name: 'my',
        component: () => import('../views/My.vue')
    }, {
        path: '/musician',
        name: 'musician',
        component: () => import('../views/Musician.vue')
    }
]
// 创建路由实例
const router = createRouter({
    history: createWebHistory(),
    routes: route,
})
// 导出路由 谁使用谁引入到main.js中注册使用
export default router;